package com.bjzh.bjzh;

import com.bjzh.bjzh.servers.Jtt809NettyServer;
import com.bjzh.bjzh.servers.NettyServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;


@SpringBootApplication
@EnableScheduling
public class BjzhApplication extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(BjzhApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(BjzhApplication.class, args);
        //启动服务端

        Jtt809NettyServer jtt809NettyServer = new Jtt809NettyServer(56731);
        Thread thread2 = new Thread(jtt809NettyServer);
        thread2.start();
        NettyServer nettyServer = new NettyServer();
        Thread thread = new Thread(nettyServer);
        thread.start();




    }

}
